package jNotesUtilities;

import java.awt.Dimension;

public class PropertiesGenerator 
{
	jNotesCore.Note note;
	
	int ID;
	int ParrentID;
	
	int PosX;
	int PosY;
	
	Dimension Size;
	
	String Type;
	
	String ret;//String to return
	
	String NoteSpecific;
	public PropertiesGenerator(jNotesCore.Note Note, String NoteType)
	{
		note = Note;
		Type = NoteType;
		processData();
	}
	
	private void processData()
	{
		PosX = note.getPositionX();
		PosY = note.getPositionY();
		Size = note.getSize();
		
		if(Type.equals(Type))
		{
			NoteSpecific = "Text: " + this.note.getText();
		}
		
		//Print General information
		ret = "Note #" + ID + "\n";
		
		//Print position
		ret += "Position: X = " + PosX + "  Y = " + PosY + "\n";
		
		//Print the Dimensions
		ret += "Dimensions: " + Size.getHeight() + " X " + Size.getWidth() + "\n";
		
		//Print the Note Specific Properties
		ret += NoteSpecific;
	}
	
	public String toString()
	{
		return ret;
	}
}
